//
//  UIButton+Button.h
//  time
//
//  Created by zuo on 15/8/20.
//  Copyright (c) 2015年 chenyirong007. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface UIButton (XLExtension)

#pragma mark -
#pragma mark - 创建文字背景图片的按钮

+ (UIButton *)addTarget:(id)target
                  title:(NSString *)title
            bgImageName:(NSString *)imgName
        bgImageHighName:(NSString *)imgHighName
    bgImageSelectedName:(NSString *)imgSelectedName
                 action:(SEL)action;

#pragma mark -
#pragma mark - 创建只有图片的按钮

+ (UIButton *)addTarget:(id)target
            bgImageName:(NSString *)imgName
        bgImageHighName:(NSString *)imgHighName
    bgImageSelectedName:(NSString *)imgSelectedName
                 action:(SEL)action;

+ (UIButton *)addTarget:(id)target
              imageName:(NSString *)imgName
          imageHighName:(NSString *)imgHighName
      imageSelectedName:(NSString *)imgSelectedName
                 action:(SEL)action;


#pragma mark -
#pragma mark - 创建只有文字的按钮
/**
 *  创建一个只有普通状态下文字的按钮
 */
+ (UIButton *)addTarget:(id)target
                  title:(NSString *)title
              textColor:(UIColor *)textColor
              titleFont:(UIFont *)titleFont
                 action:(SEL)action;
/**
 *  创建一个只有普通状态下文字的按钮
 */
- (UIButton *)initTarget:(id)target
                   title:(NSString *)title
               textColor:(UIColor *)textColor
               titleFont:(UIFont *)titleFont
                  action:(SEL)action;
/**
 *  创建一个普通和高亮状态下文字的按钮
 */
+ (UIButton *)addTarget:(id)target
                  title:(NSString *)title
              textColor:(UIColor *)textColor
          highTextColor:(UIColor *)highTextColor
              titleFont:(UIFont *)titleFont
                 action:(SEL)action;
/**
 *  创建一个普通和高亮状态下文字的按钮
 */
- (UIButton *)initTarget:(id)target
                   title:(NSString *)title
               textColor:(UIColor *)textColor
           highTextColor:(UIColor *)highTextColor
               titleFont:(UIFont *)titleFont
                  action:(SEL)action;

/**
 *  创建一个普通状态和被选择状态下只有文字的按钮
 */
+ (UIButton *)addTarget:(id)target
               norTitle:(NSString *)norTitle
               norColor:(UIColor *)norcolor
          selectedTitle:(NSString *)selectedTitle
          selectedColor:(UIColor *)selectedColor
              titleFont:(UIFont *)font
                 action:(SEL)action;
/**
 *  创建一个普通状态和被选择状态下只有文字的按钮
 */
- (UIButton *)initTarget:(id)target
                norTitle:(NSString *)norTitle
                norColor:(UIColor *)norcolor
           selectedTitle:(NSString *)selectedTitle
           selectedColor:(UIColor *)selectedColor
               titleFont:(UIFont *)font
                  action:(SEL)action;

/**
 *  创建一个普通状态和被选择状态下有文字和背景颜色的按钮
 */
+ (UIButton *)addTarget:(id)target
               norTitle:(NSString *)norTitle
               norColor:(UIColor *)norcolor
          selectedTitle:(NSString *)selectedTitle
          selectedColor:(UIColor *)selectedColor
              titleFont:(UIFont *)font
        backgroundColor:(UIColor *)backgroundColor
                 action:(SEL)action;
/**
 *  创建一个普通状态和被选择状态下有文字和背景颜色的按钮
 */
- (UIButton *)initTarget:(id)target
                norTitle:(NSString *)norTitle
                norColor:(UIColor *)norcolor
           selectedTitle:(NSString *)selectedTitle
           selectedColor:(UIColor *)selectedColor
               titleFont:(UIFont *)font
         backgroundColor:(UIColor *)backgroundColor
                  action:(SEL)action;

/**
 *  创建一个普通状态和高亮状态下有文字和背景颜色的按钮
 */
+ (UIButton *)addTarget:(id)target
               norTitle:(NSString *)norTitle
               norColor:(UIColor *)norcolor
              highTitle:(NSString *)highTitle
              highColor:(UIColor *)highColor
              titleFont:(UIFont *)font
        backgroundColor:(UIColor *)backgroundColor
                 action:(SEL)action;
/**
 *  创建一个普通状态和高亮状态下有文字和背景颜色的按钮
 */
- (UIButton *)initTarget:(id)target
                norTitle:(NSString *)norTitle
                norColor:(UIColor *)norcolor
               highTitle:(NSString *)highTitle
               highColor:(UIColor *)highColor
               titleFont:(UIFont *)font
         backgroundColor:(UIColor *)backgroundColor
                  action:(SEL)action;

/**
 *  创建高亮纯背景颜色图片的按钮
 */
+ (UIButton *)addTarget:(id)target
               norTitle:(NSString *)norTitle
               norColor:(UIColor *)norcolor
          selectedTitle:(NSString *)selectedTitle
          selectedColor:(UIColor *)selectedColor
              highTitle:(NSString *)highTitle
              highColor:(UIColor *)highColor
              titleFont:(UIFont *)font
          norBgColorImg:(UIColor *)norBgColorImg
         highBgColorImg:(UIColor *)highBgColorImg
     selectedBgColorImg:(UIColor *)selectedBgColorImg
                 action:(SEL)action;
@end
